package com.anjubao.parking.municipal.payment.model;

import com.anjubao.parking.municipal.common.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 交易退款订单表
 *
 * @author zhuchunfeng
 */
@Getter
@Setter
@TableName("parking_trade_refund")
@ApiModel(value="ParkingTradeRefund",description = "交易退款订单表")
public class ParkingTradeRefund extends BaseEntity<ParkingTradeRefund>{

    @TableId(type = IdType.INPUT)
    @TableField(value="out_refund_id")
    @ApiModelProperty(name="outRefundId",value = "退款订单ID ")
    private Long outRefundId;

    @TableField(value="out_refund_no")
    @ApiModelProperty(name="outRefundNo",value = "退款订单ID，商户退款单号,商户系统内部的退款单号，商户系统内部唯一，同一退款单号多次请求只退一笔 生成规则为301(3位)+yyMMddHHmm(10位)+out_refund_id(19位)")
    private String outRefundNo;

    @TableField(value="parking_record_id")
    @ApiModelProperty(name="parkingRecordId",value = "进出记录ID")
    private Long parkingRecordId;

    @TableField(value="app_id")
    @ApiModelProperty(name="appId",value = "公众账号ID")
    private String appId;

    @TableField(value="mch_id")
    @ApiModelProperty(name="mchId",value = "商户号")
    private String mchId;

    @TableField(value="sub_mch_id")
    @ApiModelProperty(name="subMchId",value = "子商户号")
    private String subMchId;

    @TableField(value="device_info")
    @ApiModelProperty(name="deviceInfo",value = "设备号")
    private String deviceInfo;

    @TableField(value="out_trade_no")
    @ApiModelProperty(name="outTradeNo",value = "商户订单号")
    private String outTradeNo;

    @TableField(value="transaction_id")
    @ApiModelProperty(name="transactionId",value = "微信支付订单号，第三方支付平台订单号")
    private String transactionId;

    @TableField(value="total_fee")
    @ApiModelProperty(name="totalFee",value = "订单总金额")
    private Integer totalFee;

    @TableField(value="refund_fee")
    @ApiModelProperty(name="refundFee",value = "申请退款金额")
    private Integer refundFee;

    @TableField(value="refund_fee_type")
    @ApiModelProperty(name="refundFeeType",value = "货币类型 CNY")
    private String refundFeeType;

    @TableField(value="op_user_id")
    @ApiModelProperty(name="opUserId",value = "操作员帐号, 默认为商户号")
    private String opUserId;

    @TableField(value="refund_account")
    @ApiModelProperty(name="refundAccount",value = "退款资金来源")
    private String refundAccount;

    @TableField(value="refund_id")
    @ApiModelProperty(name="refundId",value = "微信退款单号,微信返回的退款单号")
    private String refundId;

    @TableField(value="refund_channel")
    @ApiModelProperty(name="refundChannel",value = "退款渠道，ORIGINAL—原路退款 BALANCE—退回到余额")
    private String refundChannel;

    @TableField(value="settlement_refund_fee")
    @ApiModelProperty(name="settlementRefundFee",value = "微信返回的实际退款金额，去掉非充值代金券退款金额后的退款金额，退款金额=申请退款金额-非充值代金券退款金额，退款金额<=申请退款金额")
    private Integer settlementRefundFee;

    @TableField(value="settlement_total_fee")
    @ApiModelProperty(name="settlementTotalFee",value = "应结订单金额，去掉非充值代金券金额后的订单总金额，应结订单金额=订单金额-非充值代金券金额，应结订单金额<=订单金额。")
    private Integer settlementTotalFee;

    @TableField(value="cash_fee")
    @ApiModelProperty(name="cashFee",value = "现金支付金额")
    private Integer cashFee;

    @TableField(value="cash_refund_fee")
    @ApiModelProperty(name="cashRefundFee",value = "现金退款金额")
    private Integer cashRefundFee;

    @TableField(value="payer_openid")
    @ApiModelProperty(name="payerOpenid",value = "openID")
    private String payerOpenid;

    @TableField(value="payer_phone")
    @ApiModelProperty(name="payerPhone",value = "用户标识，用户手机号")
    private String payerPhone;

    @TableField(value="payer_customer_id")
    @ApiModelProperty(name="payerCustomerId",value = "用户标识，用户id")
    private String payerCustomerId;

    @TableField(value="refund_status")
    @ApiModelProperty(name="refundStatus",value = "退款状态，0：退款中，1：退款成功，2：退款失败")
    private Integer refundStatus;

    @TableField(value="refund_recv_accout")
    @ApiModelProperty(name="refundRecvAccout",value = "退款入账账户")
    private String refundRecvAccout;

    @TableField(value="refund_create_time")
    @ApiModelProperty(name="refundCreateTime",value = "退款订单创建时间")
    private LocalDateTime refundCreateTime;

    @TableField(value="refund_update_time")
    @ApiModelProperty(name="refundUpdateTime",value = "退款订单更新时间")
    private LocalDateTime refundUpdateTime;

    @TableField(value="remark")
    @ApiModelProperty(name="remark",value = "退款单备注")
    private String remark;


}